package com.ruoyi.jjyh.controller;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.EmptyUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.jjyh.domain.JjyhBanner;
import com.ruoyi.jjyh.domain.JjyhGoodsclass;
import com.ruoyi.jjyh.service.IJjyhBannerService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 轮播图Controller
 * 
 * @author ruoyi
 * @date 2020-11-24
 */
@Controller
@RequestMapping("/phone/jjyh/banner")
public class JjyhBannerPhoneController extends BaseController
{
    @Autowired
    private IJjyhBannerService jjyhBannerService;

    /**
     * 获取首页轮播
     * @return
     */
    @RequestMapping("/getBanner")
    @ResponseBody
    public AjaxResult getBanner(){
        JjyhBanner banner = new JjyhBanner();
        return success("获取成功", jjyhBannerService.selectJjyhBannerList(banner));

    }
}
